home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / linear-programming-faq < prev    next >
Encoding:
Text File  |  1995-07-25  |  62.0 KB  |  1,302 lines

  1. Subject: Linear Programming FAQ
  2. Newsgroups: news.answers,sci.answers,sci.op-research
  3. From: jwg@cray.com (John Gregory)
  4. Date: 1 Nov 94 08:59:11 CST
  5.  
  6. Posted-By: auto-faq 2.4
  7. Archive-name: linear-programming-faq
  8. Last-modified: November 1, 1994
  9.  
  10.      Linear Programming - Frequently Asked Questions List 
  11.  
  12. Posted monthly to Usenet newsgroup sci.op-research 
  13. World Wide Web version: 
  14.   ftp://ftp.cray.com/pub/FAQs/linear-programming-faq.html 
  15. Plain-text version: 
  16.   ftp://rtfm.mit.edu/pub/usenet/sci.answers/linear-programming-faq 
  17. Date of this version: November 1, 1994 
  18.  
  19. "Not many people realize just how well known I am." -- Anonymous 
  20.  
  21.  o Q1. "What is Linear Programming?" 
  22.  o Q2. "Where is there a good code to solve LP problems?" 
  23.  o Q3. "Oh, and we also want to solve it as an integer program."
  24.  o Q4. "I wrote an optimization code. Where are some test
  25.    models?" 
  26.  o Q5. "What is MPS format?" 
  27.  o Q6. "Just a quick question..." 
  28.  o Q7. "What references are there in this field?" 
  29.  o Q8. "How do I access the Netlib server?" 
  30.  o Q9. "Who maintains this FAQ list?" 
  31.  
  32. See also the related Nonlinear Programming FAQ . 
  33.  
  34.  
  35. Q1. "What is Linear Programming?" 
  36. ++++++++++++++++++++++++++++++++++
  37.  
  38. A: (For rigorous definitions and theory, which are beyond the scope
  39. of this document, the interested reader is referred to the many LP
  40. textbooks in print, a few of which are listed in the references
  41. section.) 
  42.  
  43. A Linear Program (LP) is a problem that can be expressed as
  44. follows (the so-called Standard Form): 
  45.  
  46.     minimize   cx
  47.     subject to Ax  = b
  48.                 x >= 0
  49.  
  50. where x is the vector of variables to be solved for, A is a matrix of
  51. known coefficients, and c and b are vectors of known coefficients.
  52. The expression "cx" is called the objective function, and the
  53. equations "Ax=b" are called the constraints. All these entities must
  54. have consistent dimensions, of course, and you can add "transpose"
  55. symbols to taste. The matrix A is generally not square, hence you
  56. don't solve an LP by just inverting A. Usually A has more columns
  57. than rows, and Ax=b is therefore quite likely to be
  58. under-determined, leaving great latitude in the choice of x with
  59. which to minimize cx. 
  60.  
  61. Although all linear programs *can* be put into the Standard Form,
  62. in practice it may not be necessary to do so. For example, although
  63. the Standard Form requires all variables to be non-negative, most
  64. good LP software allows general bounds l <= x <= u, where l and u
  65. are vectors of known lower and upper bounds. Individual elements
  66. of these bounds vectors can even be infinity and/or minus-infinity.
  67. This allows a variable to be without an explicit upper or lower
  68. bound, although of course the constraints in the A-matrix will
  69. need to put implied limits on the variable or else the problem may
  70. have no finite solution! Similarly, good software allows b1 <= Ax
  71. <= b2 for arbitrary b1, b2; there's no need to write any rows of A
  72. twice. Also, LP software can handle maximization problems just as
  73. easily as minimization (in effect, the vector c is just multiplied by
  74. -1). 
  75.  
  76. LP problems are usually solved by a technique known as the
  77. Simplex Method, developed in the 1940's and after. Briefly stated,
  78. this method works by taking a sequence of square submatrices of A
  79. and solving for x, in such a way that successive solutions always
  80. improve, until a point in the algorithm is reached where
  81. improvement is no longer possible. A family of LP algorithms
  82. known as Interior-Point (or Barrier) methods comes from
  83. nonlinear programming approaches proposed in 1958 and further
  84. developed in the late 80's. These methods can be faster for many
  85. (but so far not all) large-scale problems. Such methods are
  86. characterized by constructing a sequence of trial solutions that go
  87. through the interior of the solution space, in contrast to the
  88. Simplex Method which stays on the boundary and examines only
  89. the corners (vertices). Large-scale LP software, whatever the
  90. algorithm, invariably uses general-structure sparse matrix
  91. techniques. 
  92.  
  93. The word "Programming" is used here in the sense of "planning";
  94. the necessary relationship to computer programming was incidental
  95. to the choice of name. Hence the phrase "LP program" to refer to a
  96. piece of software is not a redundancy, although I tend to use the
  97. term "code" instead of "program" to avoid the possible ambiguity. 
  98.  
  99. LP has a variety of uses, in such areas as petroleum, finance,
  100. forestry, transportation, and the military. 
  101.  
  102.  
  103. Q2. "Where is there a good code to solve LP problems?" 
  104. +++++++++++++++++++++++++++++++++++++++++++++++++++++++
  105.  
  106. A: Nowadays, with good commercial software (i.e., code that you
  107. pay for), models with a few thousand constraints and several
  108. thousand variables can be tackled on a 386 PC. Workstations can
  109. often handle models with variables in the tens of thousands, or even
  110. greater, and mainframes can go larger still. Public domain (free)
  111. codes can be relied on to solve models of somewhat smaller
  112. dimension. The choice of code can make more difference than the
  113. choice of computer hardware. It's hard to be specific about model
  114. sizes and speed, a priori, due to the wide variation in things like
  115. model structure and variation in factorizing the basis matrices; just
  116. because a given code has solved a model of a certain dimension, it
  117. may not be able to solve *all* models of the same size, or in the
  118. same amount of time. 
  119.  
  120. There is a public domain code, written in C, called lp_solve that its
  121. author (Michel Berkelaar, email at michel@es.ele.tue.nl ) says has
  122. solved models with up to 30,000 variables and 50,000 constraints.
  123. The author requests that people retrieve it from
  124. ftp://ftp.es.ele.tue.nl/pub/lp_solve (numerical address at last check:
  125. 131.155.20.126). There is an older version to be found in the Usenet
  126. archives, but it contains bugs that have been fixed in the meantime,
  127. and hence is unsupported. The author also made available a
  128. program that converts data files from MPS-format into lp_solve's
  129. own input format; it's in the same directory, in file
  130. mps2eq_0.2.tar.Z. (As an editorial opinion, I must state that
  131. difficult models will give this code trouble. It's not as good as a
  132. commercial code. But for someone who isn't sure just what kind of
  133. LP code is needed, it represents a very reasonable first try, since it
  134. does solve non-trivial-sized models, and it is free.) 
  135.  
  136. For academic users only, on a limited variety of platforms, there is
  137. available a free version of LOQO, which is a linear/quadratic
  138. program solver. Binary executables have been installed at
  139. ftp://elib.zib-berlin.de/pub/opt-net/software/loqo. There are
  140. versions for workstations by IBM, Silicon Graphics, HP, and Sun.
  141. The package includes a subroutine library (libloqo.a), an executable
  142. (loqo), the source for the main part of loqo (loqo.c), and associated
  143. documentation (loqo.dvi and *.eps). The algorithm used is a
  144. one-phase primal-dual-symmetric interior-point method. If you
  145. wish to purchase a commercial version, please contact Bob
  146. Vanderbei (rvdb@Princeton.EDU) for details. 
  147.  
  148. Among the SLATEC library routines is a sparse implementation of
  149. the Simplex method, in Fortran, available at
  150. ftp://netlib2.cs.utk.edu/slatec/src/splp.f. Its documentation states 
  151. that it can solve LP models of "at most a few thousand constraints and
  152. variables". 
  153.  
  154. The next several suggestions are for public-domain codes that are
  155. severely limited by the algorithm they use (tableau Simplex); they
  156. may be OK for models with (on the order of) 100 variables and
  157. constraints, but it's unlikely they will be satisfactory for larger
  158. models. 
  159.  
  160.  o For DOS/PC users, there is an LP and Linear Goal
  161.    Programming binary called tslin, at ftp://garbo.uwasa.fi/pc/ts
  162.    (the current file name is tslin34.zip, using ZIP compression),
  163.    or else I suggest contacting Prof. Salmi at ts@uwasa.fi . For
  164.    North American users, the garbo server is mirrored on FTP
  165.    site wuarchive.wustl.edu, in directory
  166.    mirrors/garbo.uwasa.fi. 
  167.  o Also on the garbo server is a file called lp261.zip, having a
  168.    descriptor of "Linear Programming Optimizer by ScanSoft".
  169.    It consists of PC binaries, and is evidently some sort of
  170.    shareware (i.e., not strictly public domain). 
  171.  o There is an ACM TOMS routine for LP, #552, available at
  172.    ftp://netlib2.cs.utk.edu/toms/552. This routine was designed
  173.    for fitting data to linear constraints using an L1 norm, but it
  174.    uses a modification of the Simplex Method and could
  175.    presumably be modified to satisfy LP purposes. 
  176.  o There are books that contain source code for the Simplex
  177.    Method. See the section on references. You should not
  178.    expect such code to be robust. In particular, you can check
  179.    whether it uses a 2-dimensional array for the A-matrix; if
  180.    so, it is surely using the tableau Simplex Method rather than
  181.    sparse methods, and it will not be useful for large models.
  182.    But certainly, if your LP models are dense (and, perforce,
  183.    small), such a code may be suitable, and even preferable
  184.    over a more "sophisticated" sparse code; no snobbism is
  185.    implied by any of these comments! 
  186.  
  187. For Macintosh users there is a package of unknown quality called 
  188. LinPro that is available at
  189. ftp://ra.nrl.navy.mil/MacSciTech/programming/. 
  190.  
  191. The following suggestions may represent a low-cost way of solving
  192. LP's if you already have certain software available to you. 
  193.  
  194.  o Some spreadsheet programs have an embedded LP solver, or
  195.    offer one as an installable option. 
  196.  o A package called QSB (Quantitative Systems for Business,
  197.    from Prentice-Hall publishers) has an LP module among its
  198.    routines. 
  199.  o If you have access to a commercial math library, such as
  200.    SAS, IMSL or NAG, you may be able to use an LP routine
  201.    from there. 
  202.  o Mathematical systems MATLAB (The Math Works, Inc.,
  203.    (508) 653-1415, see comment in the NLP FAQ) and
  204.    MAPLE (reference?) also have LP solvers. An interface
  205.    from MATLAB to lp_solve is available from Jeff Kantor
  206.    (Jeffrey.Kantor@nd.edu) in
  207.    ftp://control.cheg.nd.edu/pub/Kantor/matlab/lp_solve. A
  208.    MATLAB toolkit for solving LP models using
  209.    Interior-Point methods, called LIPSOL is available at
  210.    ftp://ftp.math.umbc.edu/pub/zhang/lipsol - check the
  211.    documentation in this directory (currently in file
  212.    release.beta) for more information. There is an FTP site
  213.    with user-contributed .m files to do Simplex located at 
  214.    ftp://ftp.mathworks.com/pub/contrib/optim/simplex1. There's
  215.    a Usenet newsgroup on MATLAB: comp.soft-sys.matlab. If
  216.    speed matters to you, then according to a Usenet posting by
  217.    Pascal Koiran (koiran@ens-lyon.fr), on randomly generated
  218.    LP models, MATLAB was an order of magnitude faster
  219.    than MAPLE on a 200x20 problem but an order of
  220.    magnitude slower than lp_solve on a 50x100 problem. (I
  221.    don't intend to get into benchmarking in this document, but
  222.    I mention these results just to explain why I choose to focus
  223.    mostly on special purpose LP software.) 
  224.  
  225. If your models prove to be too difficult for free or add-on software
  226. to handle, then you may have to consider acquiring a commercial
  227. LP code. Dozens of such codes are on the market. There are many
  228. considerations in selecting an LP code. Speed is important, but LP
  229. is complex enough that different codes go faster on different
  230. models; you won't find a "Consumer Reports" article to say with
  231. certainty which code is THE fastest. I usually suggest getting
  232. benchmark results for your particular type of model if speed is
  233. paramount to you. Benchmarking can also help determine whether
  234. a given code has sufficient numerical stability for your kind of
  235. models. 
  236.  
  237. Other questions you should answer: Can you use a stand-alone
  238. code, or do you need a code that can be used as a callable library, or
  239. do you require source code? Do you want the flexibility of a code
  240. that runs on many platforms and/or operating systems, or do you
  241. want code that's tuned to your particular hardware architecture (in
  242. which case your hardware vendor may have suggestions)? Is the
  243. choice of algorithm (Simplex, Interior-Point) important to you? Do
  244. you need an interface to a spreadsheet code? Is the purchase price
  245. an overriding concern? If you are at a university, is the software
  246. offered at an academic discount? How much hotline support do you
  247. think you'll need? There is usually a large difference in LP codes, in
  248. performance (speed, numerical stability, adaptability to computer
  249. architectures) and in features, as you climb the price scale. 
  250.  
  251. At the end of this section is a *very* condensed version of a survey
  252. of LP software published in the June 1992 issue of "OR/MS
  253. Today", a joint publication of ORSA (Operations Research Society
  254. of America) and TIMS (The Institute of Management Science).
  255. For further information I would suggest you read the full article.
  256. It's likely that you can find a copy, either through a library, or by
  257. contacting a member of these two organizations (most universities
  258. have probably several members among the faculty and student
  259. body). This magazine also carries advertisements for many of these
  260. products, which may give you additional information to help make
  261. a decision. 
  262.  
  263. In the table below, I give the name of the software and the phone
  264. number listed in the June 1992 survey. Many of these companies
  265. have toll-free (800) numbers, but for the benefit of people outside
  266. the US I have listed an ordinary phone number where I know of it.
  267. To keep the table short enough to fit here, I decided not to include
  268. postal addresses. I have included, where I know of one, an email
  269. address (information not given in the June 1992 survey), and other
  270. information obtained from non-proprietary sources. For some
  271. companies there may exist European or Asian contact points, but
  272. this is beyond the scope of this document. Consult the full survey
  273. for more information on contacting vendors. 
  274.  
  275. The first part of the table consists of software I deem to be LP
  276. solvers. The second part is software that in some sense is a front
  277. end to the solvers (modeling software). In some cases it becomes a
  278. hazy distinction, but I hope this arrangement of information turns
  279. out to be useful to the reader. 
  280.  
  281. Under "H/W" is the minimum hardware said to be needed to run
  282. the code; generally I conceive of a hierarchy where PC's (and
  283. Macintoshes) are the least powerful, then workstations (WS) like
  284. Suns and RS-6000's, on up to supercomputers, so by the symbol
  285. "^" I mean "and up", namely that most commonly-encountered
  286. platforms are supported beyond the given minimum level. The code
  287. PC2 means PC-286 and above, and PC3 means PC-386 and above.
  288.  
  289. Even more so than usual, I emphasize that you must use this
  290. information at your own risk. I provide it as a convenience to those
  291. readers who have difficulty in locating the OR/MS Today survey. I
  292. take no responsibility for errors either in the original article or by
  293. my act of copying it manually, though I will gladly correct any
  294. mistakes that are pointed out to me. 
  295.  
  296. Key to Features:  S=Simplex    I=Interior-Point or Barrier
  297.                   Q=Quadratic  G=General-Nonlinear
  298.                   M=MIP        N=Network
  299.                   V=Visualization
  300. Solver
  301. Code Name    Feat. H/W       Phone        Email address
  302. ---------    ----- --------- ------------ -------------
  303. AT&T KORBX   IQ    WS ^      908-949-8966
  304. Best Answer  S     Mac-Plus  510-943-7667
  305. CPLEX        SIMN  PC3 ^     702-831-7744 info@cplex.com
  306. Excel        SMG   PC/Mac    206-882-8080
  307. FortLP       SM    PC ^      708-971-2337
  308. HS/LP        SM    PC3/VAX   201-627-1424
  309. IBM OSL      SIMNQ PC/WS/IBM 914-385-6034 randym@vnet.ibm.com
  310. INCEPTA      SMV   PC3       416-896-0515
  311. LAMPS        SM    PC3 ^     413-584-1605 al@amsoft.demon.co.uk
  312. LINDO        SMQ   PC ^      312-871-2524 lindo@delphi.com
  313. LOQO         IQ    PC ^      609-258-0876 rvdb@princeton.edu
  314. LP88         S     PC        703-360-7600
  315. LPS-867      SM    PC/RS6000 609-737-6800
  316. MathPro      SMV   PC2/WS    202-887-0296
  317. MILP88       SM    PC        703-360-7600
  318. MILP LO      SV    PC      (+361)149-7531
  319. MINOS        SQG   PC ^      415-962-8719 mike@sol-michael.stanford.edu
  320. MINTO        M     WS        404-894-6287
  321. MPS-III      SMNQ  PC3 ^     703-412-3201
  322. MSLP-PC      S     PC        604-361-9778
  323. OMP          SM    PC/VAX/WS 919-847-9997
  324. PC-PROG      SMQ   PC        919-847-9997 Ge.vanGeldorp@lr.tudelft.nl
  325. SAS/OR       SMN   PC ^      919-677-8000
  326. SCICONIC     SM    PC3 ^  (+44)908-585858
  327. STORM        SMN   PC        216-464-1209
  328. TurboSimplex S     PC/Mac    703-351-5272
  329. What If      SMG   PC        800-447-2226
  330. XA           SM    PC ^      818-441-1565 sunsetsoft@aol.com
  331. XPRESS-MP    SM    PC3/Mac ^ 202-887-0296 rcd@dashbh.demon.co.uk
  332.  
  333. Modeling
  334. Code Name          H/W        Phone        Email address
  335. ---------          --------- ------------ -------------
  336. AIMMS              PC3    (+31)023-350935 info@paragon.nl
  337. AMPL               PC3 ^     508-777-9069 ampl@research.att.com
  338. DATAFORM           PC3 ^     703-558-8701
  339. GAMS               PC2 ^     415-583-8840 gams@gams.com
  340. LINGO              PC ^      312-871-2524 lindo@delphi.com
  341. MIMI/LP            WS        908-464-8300
  342. MPL Sys.           PC        703-351-5272
  343. OMNI               PC3 ^     202-627-1424
  344. VMP                PC3/WS    301-622-0694
  345. What's Best!       PC/Mac/WS 800-441-2378 lindo@delphi.com
  346. XPRESS-MP          PC3/Mac ^ 202-887-0296 rcd@dashbh.demon.co.uk
  347.  
  348. The author of the OR/MS Today survey, Ramesh Sharda, has
  349. updated and expanded it in 1993 into a larger report called "Linear
  350. and Discrete Optimization and Modeling Software: A Resource
  351. Handbook". For information, contact Lionheart Publishing Inc.,
  352. 2555 Cumberland Parkway, Suite 299, Atlanta, GA 30339. Phone:
  353. (404)-431-0867. This book is fairly expensive, and geared toward
  354. users whose needs for LP software are considerable. Another book
  355. that became available in November 1993 is the "Optimization
  356. Software Guide," by Jorge More' and Stephen Wright, from SIAM
  357. Books. Call 1-800-447-7426 to order ($24.50, less ten percent if
  358. you are a SIAM member). It contains references to 75 available
  359. software packages (not all of them just LP), and goes into more
  360. detail than is possible in this FAQ. 
  361.  
  362.  
  363. Q3. "Oh, and we also want to solve it as an integer program. 
  364. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  365.  
  366. A: Integer LP models are ones where the answers must not take
  367. fractional values. It may not be obvious that this is a VERY much
  368. harder problem than ordinary LP, but it is nonetheless true. The
  369. buzzword is "NP-Completeness", the definition of which is beyond
  370. the scope of this document but means in essence that, in the worst
  371. case, the amount of time to solve a family of related problems goes
  372. up exponentially as the size of the problem grows, for all algorithms
  373. that solve such problems to a proven answer. 
  374.  
  375. Integer models may be ones where only some of the variables are to
  376. be integer and others may be real-valued (termed "Mixed Integer
  377. LP" or MILP, or "Mixed Integer Programming" or MIP); or they
  378. may be ones where all the variables must be integral (termed
  379. "Integer LP" or ILP). The class of ILP is often further subdivided
  380. into problems where the only legal values are {0,1} ("Binary" or
  381. "Zero-One" ILP), and general integer problems. For the sake of
  382. generality, the Integer LP problem will be referred to here as MIP,
  383. since the other classes can be viewed as special cases of MIP. MIP,
  384. in turn, is a particular member of the class of Discrete
  385. Optimization problems. 
  386.  
  387. People are sometimes surprised to learn that MIP problems are
  388. solved using floating point arithmetic. Although various algorithms
  389. for MIP have been studied, most if not all available general purpose
  390. large-scale MIP codes use a method called "Branch and Bound" to
  391. try to find an optimal solution. Briefly stated, B&B solves MIP by
  392. solving a sequence of related LP models. (As a point of interest, the
  393. Simplex Method currently retains an advantage over the newer
  394. Interior-Point methods for solving these sequences of LP's.) Good
  395. codes for MIP distinguish themselves more by solving shorter
  396. sequences of LP's, than by solving the individual LP's faster. Even
  397. more so than with regular LP, a costly commercial code may prove
  398. its value to you if your MIP model is difficult. 
  399.  
  400. You should be prepared to solve *far* smaller MIP models than the
  401. corresponding LP model, given a certain amount of time you wish
  402. to allow (unless you and your model happen to be very lucky).
  403. There exist models that are considered challenging, with a few
  404. dozen variables. Conversely, some models with tens of thousands of
  405. variables solve readily. The best explanations of "why" usually
  406. seem to happen after the fact. 8v) But a MIP model with hundreds
  407. of variables should always be approached, initially at least, with a
  408. certain amount of humility. 
  409.  
  410. A major exception to this somewhat gloomy outlook is that there
  411. are certain models whose LP solution always turns out to be
  412. integer, assuming the input data is integer to start with. The theory
  413. of unimodular matrices is fundamental here. It turns out that such
  414. problems are best solved by specialized routines that take major
  415. shortcuts in the Simplex Method, and as a result are relatively
  416. quick- running compared to ordinary LP. See the section on 
  417. Network models for further information. 
  418.  
  419. The public domain code lp_solve, mentioned earlier, accepts MIP
  420. models, as do a large number of the commercial LP codes in the
  421. June 1992 OR/MS Today survey (see section above). There is, in
  422. the April 1994 issue of OR/MS Today, a survey of MIP codes,
  423. which largely overlaps the content of the earlier survey on LP. 
  424.  
  425. I have seen mention made of algorithm 333 in the Collected
  426. Algorithms from CACM, though I'd be surprised if it was robust
  427. enough to solve large models. I am not aware of this algorithm
  428. being available online anywhere. 
  429.  
  430. In [Syslo] is code for 28 algorithms, most of which pertain to some
  431. aspect of Discrete Optimization. 
  432.  
  433. There is a code called Omega that analyzes systems of linear
  434. equations in integer variables. It does not solve optimization
  435. problems, except in the case that a model reduces completely, but
  436. its features could be useful in analyzing and reducing MIP models.
  437. It's available at ftp.cs.umd.edu:pub/omega (documentation is
  438. provided there), or contact Bill Pugh at pugh@cs.umd.edu. 
  439.  
  440. Mustafa Akgul (akgul@bilkent.edu.tr) at Bilkent University 
  441. maintains an archive in ftp://ftp.bilkent.edu.tr/pub/IEOR/Opt. There
  442. is a copy of lp_solve (though I would recommend using the official
  443. source listed in the previous section), and there is mip386.zip, which
  444. is a zip-compressed code for PC's. He also has a couple of network
  445. codes and various other codes he has picked up. All this is in the
  446. further subdirectories LP, PC, and Network. In addition to the ftp
  447. site, there is gopher (gopher.bilkent.edu.tr), Web
  448. (www.bilkent.edu.tr), and archive-server@bilkent.edu.tr. 
  449.  
  450. The better commercial MIP codes have numerous parameters and
  451. options to give the user control over the solution strategy. Most
  452. have the capability of stopping before an optimum is proved,
  453. printing the best answer obtained so far. For many MIP models,
  454. stopping early is a practical necessity. Fortunately, a solution that
  455. has been proved by the algorithm to be within, say, 1% of
  456. optimality often turns out to be the true optimum, and the bulk of
  457. the computation time is spent proving the optimality. For many
  458. modeling situations, a near-optimal solution is acceptable anyway. 
  459.  
  460. Once one accepts that large MIP models are not typically solved to
  461. a proved optimal solution, that opens up a broad area of
  462. approximate methods, probabilistic methods and heuristics, as well
  463. as modifications to B&B. See [Balas] which contains a useful
  464. heuristic for 0-1 MIP models. See also the brief discussion of
  465. Genetic Algorithms and Simulated Annealing in the Nonlinear
  466. Programming FAQ. 
  467.  
  468. Whatever the solution method you choose, when trying to solve a
  469. difficult MIP model, it is usually crucial to understand the workings
  470. of the physical system (or whatever) you are modeling, and try to
  471. find some insight that will assist your chosen algorithm to work
  472. better. A related observation is that the way you formulate your
  473. model can be as important as the actual choice of solver. You
  474. should consider getting some assistance if this is your first time
  475. trying to solve a large (>100 integer variable) problem. 
  476.  
  477.  
  478. Q4. "I wrote an optimization code. Where are some test models?" 
  479. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  480.  
  481. A: If you want to try out your code on some real-world LP models,
  482. there is a very nice collection of small-to-medium-size ones, with
  483. a few that are rather large, at ftp://netlib2.cs.utk.edu/lp/data,
  484. popularly known as the Netlib collection (although Netlib consists
  485. of much more than just LP). These files (after you uncompress
  486. them) are in a format called MPS, which is described in another
  487. section of this document. Note that, when you receive a model, it
  488. may be compressed both with the Unix utility (use `uncompress` if
  489. the file name ends in .Z) AND with an LP-specific program (grab
  490. either emps.f or emps.c at the same time you download the model,
  491. then compile/run the program to reverse the compression). 
  492.  
  493. Also on netlib is a collection of infeasible LP models, located in
  494. ftp://netlib2.cs.utk.edu/lp/infeas. 
  495.  
  496. There is a collection of MIP models, housed at Rice University in
  497. ftp://softlib.cs.rice.edu/pub/miplib. Send an email message
  498. containing "send catalog" to softlib@rice.edu , to get started, if you
  499. can't access the files by other means. There's also a Travelling
  500. Salesman Problem (TSP) collection in
  501. ftp://softlib.cs.rice.edu/pub/tsplib. 
  502.  
  503. There is a collection of network-flow codes and models at
  504. ftp://dimacs.rutgers.edu/pub/netflow. Another network generator is
  505. called NETGEN and is available at
  506. ftp://netlib2.cs.utk.edu/lp/generators. 
  507.  
  508. The commercial modeling language GAMS comes with about 150
  509. test models, which you might be able to test your code with.
  510. AIMMS also comes with some test models. 
  511.  
  512. There is a collection called MP-TESTDATA available at
  513. Konrad-Zuse-Zentrum fuer Informations-technik Berlin (ZIB) in
  514. ftp://elib.zib-berlin.de/pub/mp-testdata. This directory contains
  515. various subdirectories, each of which has a file named "index"
  516. containing further information. Indexed at this writing are: assign,
  517. cluster, lp, ip, matching, maxflow, mincost, set-parti, steiner-tree,
  518. tsp, vehicle-rout, and generators. 
  519.  
  520. John Beasley maintains the OR-Lib, at
  521. ftp://mscmga.ms.ic.ac.uk/pub/, which contains various optimization
  522. test problems. There is an index in
  523. ftp://mscmga.ms.ic.ac.uk/pub/info.txt. Have a look in the Journal of
  524. the Operational Research Society, Volume 41, Number 11, Pages
  525. 1069-72. If you can't access these resources, send e-mail to
  526. umtsk99@vaxa.cc.imperial.ac.uk to get started. Information about
  527. test problems can be obtained by emailing o.rlibrary@ic.ac.uk with
  528. the email message being the file name for the problem areas you
  529. are interested in, or just the word "info". 
  530.  
  531.  
  532.  
  533.  
  534.  
  535. Q5. "What is MPS format?" 
  536. ++++++++++++++++++++++++++
  537.  
  538. A: MPS format was named after an early IBM LP product and has
  539. emerged as a de facto standard ASCII medium among most of the
  540. commercial LP codes. Essentially all commercial LP codes accept
  541. this format, but if you are using public domain software and have
  542. MPS files, you may need to write your own reader routine for this.
  543. It's not too hard. See also the comment regarding the lp_solve code,
  544. in another section of this document, for the availability of an MPS
  545. reader. 
  546.  
  547. The main things to know about MPS format are that it is column
  548. oriented (as opposed to entering the model as equations), and
  549. everything (variables, rows, etc.) gets a name. MPS format is
  550. described in more detail in [Murtagh]. A brief description of MPS
  551. format is available at ftp://softlib.cs.rice.edu/pub/miplib 
  552.  
  553. MPS is an old format, so it is set up as though you were using
  554. punch cards, and is not free format. Fields start in column 1, 5, 15,
  555. 25, 40 and 50. Sections of an MPS file are marked by so-called
  556. header cards, which are distinguished by their starting in column 1.
  557. Although it is typical to use upper-case throughout the file (like I
  558. said, MPS has long historical roots), many MPS-readers will
  559. accept mixed-case for anything except the header cards, and some
  560. allow mixed-case anywhere. The names that you choose for the
  561. individual entities (constraints or variables) are not important to
  562. the solver; you should pick names that are meaningful to you, or
  563. will be easy for a post-processing code to read. 
  564.  
  565. Here is a little sample model written in MPS format (explained in
  566. more detail below): 
  567.  
  568. NAME          TESTPROB
  569. ROWS
  570.  N  COST
  571.  L  LIM1
  572.  G  LIM2
  573.  E  MYEQN
  574. COLUMNS
  575.     XONE      COST                 1   LIM1                 1
  576.     XONE      LIM2                 1
  577.     YTWO      COST                 4   LIM1                 1
  578.     YTWO      MYEQN               -1
  579.     ZTHREE    COST                 9   LIM2                 1
  580.     ZTHREE    MYEQN                1
  581. RHS
  582.     RHS1      LIM1                 5   LIM2                10
  583.     RHS1      MYEQN                7
  584. BOUNDS
  585.  UP BND1      XONE                 4
  586.  LO BND1      YTWO                -1
  587.  UP BND1      YTWO                 1
  588. ENDATA
  589.  
  590. For comparison, here is the same model written out in an
  591. equation-oriented format: 
  592.  
  593. Optimize
  594.  COST:    XONE + 4 YTWO + 9 ZTHREE
  595. Subject To
  596.  LIM1:    XONE + YTWO < = 5
  597.  LIM2:    XONE + ZTHREE > = 10
  598.  MYEQN:   - YTWO + ZTHREE  = 7
  599. Bounds
  600.  0 < = XONE < = 4
  601. -1 < = YTWO < = 1
  602. End
  603.  
  604. Strangely, there is nothing in MPS format that specifies the
  605. direction of optimization. And there really is no standard "default"
  606. direction; some LP codes will maximize if you don't specify
  607. otherwise, others will minimize, and still others put safety first and
  608. have no default and require you to specify it somewhere in a
  609. control program or by a calling parameter. If you have a model
  610. formulated for minimization and the code you are using insists on
  611. maximization (or vice versa), it may be easy to convert: just
  612. multiply all the coefficients in your objective function by (-1). The
  613. optimal value of the objective function will then be the negative of
  614. the true value, but the values of the variables themselves will be
  615. correct. 
  616.  
  617. The NAME card can have anything you want, starting in column
  618. 15. The ROWS section defines the names of all the constraints;
  619. entries in column 2 or 3 are E for equality rows, L for less-than (
  620. <= ) rows, G for greater-than ( >= ) rows, and N for
  621. non-constraining rows (the first of which would be interpreted as
  622. the objective function). The order of the rows named in this section
  623. is unimportant. 
  624.  
  625. The largest part of the file is in the COLUMNS section, which is
  626. the place where the entries of the A-matrix are put. All entries for
  627. a given column must be placed consecutively, although within a
  628. column the order of the entries (rows) is irrelevant. Rows not
  629. mentioned for a column are implied to have a coefficient of zero. 
  630.  
  631. The RHS section allows one or more right-hand-side vectors to be
  632. defined; most people don't bother having more than one. In the
  633. above example, the name of the RHS vector is RHS1, and has
  634. non-zero values in all 3 of the constraint rows of the problem.
  635. Rows not mentioned in an RHS vector would be assumed to have a
  636. right-hand-side of zero. 
  637.  
  638. The optional BOUNDS section lets you put lower and upper
  639. bounds on individual variables (no * wild cards, unfortunately),
  640. instead of having to define extra rows in the matrix. All the bounds
  641. that have a given name in column 5 are taken together as a set.
  642. Variables not mentioned in a given BOUNDS set are taken to be
  643. non-negative (lower bound zero, no upper bound). A bound of type
  644. UP means an upper bound is applied to the variable. A bound of
  645. type LO means a lower bound is applied. A bound type of FX
  646. ("fixed") means that the variable has upper and lower bounds equal
  647. to a single value. A bound type of FR ("free") means the variable
  648. has neither lower nor upper bounds. 
  649.  
  650. There is another optional section called RANGES that I won't go
  651. into here. The final card must be ENDATA, and yes, it is spelled
  652. funny. 
  653.  
  654.  
  655. Q6. "Just a quick question..." 
  656. +++++++++++++++++++++++++++++++
  657.  
  658.  o Q6.1: What is a modeling language? 
  659.  o Q6.2: How do I diagnose an infeasible LP model? 
  660.  o Q6.3: I want to know the specific constraints that contradict
  661.    each other. 
  662.  o Q6.4: I just want to know whether or not a feasible solution
  663.    *exists*. 
  664.  o Q6.5: I have an LP, except it's got several objective
  665.    functions. 
  666.  o Q6.6: I have an LP that has large almost-independent
  667.    matrix blocks that are linked by a few constraints. Can I
  668.    take advantage of this? 
  669.  o Q6.7: I am looking for an algorithm to compute the convex
  670.    hull of a finite number of points in n-dimensional space. 
  671.  o Q6.8: Are there any parallel LP codes? 
  672.  o Q6.9: What software is there for Network models? 
  673.  o Q6.10: What software is there for the Traveling Salesman
  674.    Problem (TSP)? 
  675.  o Q6.11: What software is there for the Knapsack Problem? 
  676.  o Q6.12: What software is there for Stochastic Programming?
  677.  o Q6.13: I need to do post-optimal analysis. 
  678.  o Q6.14: Do LP codes require a starting vertex? 
  679.  
  680. Q6.1: What is a modeling language? 
  681. -----------------------------------
  682.  
  683. A: This is any code that creates input for an LP (or MIP, or NLP)
  684. code, using a more flexible input than MPS format. There are no
  685. free ones. Modeling languages can be roughly broken into two
  686. classes, column oriented ones, and equation oriented ones. The
  687. former class is older, and includes such commercial products as
  688. OMNI (Haverley Systems) and DATAFORM (Ketron); they tend
  689. to be called "matrix generators" sometimes. Members of the latter
  690. class are GAMS (Scientific Press), LINGO (LINDO Systems),
  691. AIMMS (Paragon Decision Technology) and AMPL (information
  692. is in netlib/opt/ampl.info.Z on the netlib server, or send email to
  693. ampl@research.att.com). These products have links to various
  694. solvers, commercial and otherwise. 
  695.  
  696. Broadening the question slightly to cover front-ends in general, it's
  697. worth noting that people frequently use spreadsheet programs as an
  698. interface to an LP solver. 
  699.  
  700. Q6.2: How do I diagnose an infeasible LP model? 
  701. ------------------------------------------------
  702.  
  703. A: A model is infeasible if the constraints are inconsistent, i.e., if no
  704. feasible solution can be constructed. It's often difficult to track
  705. down a cause. The cure may even be ambiguous: is it that some
  706. demand was set too high, or a supply set too low? A useful
  707. technique is Goal Programming, one variant of which is to include
  708. two explicit slack variables (positive and negative), with huge cost
  709. coefficients, in each constraint. The revised model is guaranteed to
  710. have a solution, and you can look at which rows have slacks that
  711. are included in the "optimal" solution. By the way, I recommend a
  712. Goal Programming philosophy even if you aren't having trouble
  713. with feasibility; "come on, you could probably violate this
  714. constraint for a price." 8v) Another approach is Fourier-Motzkin
  715. Elimination (article by Danztig and Eaves in the Journal of
  716. Combinatorial Theory (A) 14, 288-297 (1973). A software system
  717. called ANALYZE was developed by Harvey Greenberg to provide
  718. computer-assisted analysis, including rule-based intelligence; for
  719. further information about this code, and a bibliography of more
  720. than 400 references on the subject of model analysis, contact
  721. Greenberg at HGREENBERG@cudnvr.denver.colorado.edu. A
  722. system based on the MINOS solver, called MINOS(IIS), available
  723. from John Chinneck (chinneck@sce.carleton.ca), can also be used
  724. to identify a so-called Irreducible Infeasible Subset; the IIS feature
  725. is now available in CPLEX (command "display iis") and LINDO
  726. (command "debug"). As a final comment, commercial codes
  727. sometimes have other built-in features to help track infeasibilities. 
  728.  
  729. Q6.3: I want to know the specific constraints that contradict each
  730. ------------------------------------------------------------------
  731. other. 
  732. -------
  733.  
  734. A: This may not be a well posed problem. If by this you mean you
  735. want to find the minimal set of constraints that should be removed
  736. to restore feasibility, this can be modeled as an Integer LP (which
  737. means, it's potentially a harder problem than the underlying LP
  738. itself). Start with a Goal Programming approach as outlined above,
  739. and introduce some 0-1 variables to turn the slacks off or on. Then
  740. minimize on the sum of these 0-1 variables. An article covering
  741. another approach to this question is by Chinneck and Dravnieks in
  742. the Spring 1991 ORSA Journal on Computing (vol 3, number 2). 
  743.  
  744. Q6.4: I just want to know whether or not a feasible solution
  745. ------------------------------------------------------------
  746. *exists*. 
  747. ----------
  748.  
  749. A: From the standpoint of computational complexity, finding out if
  750. a model has a feasible solution is essentially as hard as finding the
  751. optimal LP solution, within a factor of 2 on average, in terms of
  752. effort in the Simplex Method; plug your problem into a normal LP
  753. solver with any objective function you like, such as c=0. There are
  754. no shortcuts in general, unless you know something useful about
  755. your model's structure (e.g., if you are solving some form of a
  756. transportation problem, you may be able to assure feasibility by
  757. checking that the sources add up to at least as great a number as
  758. the sum of the destinations). 
  759.  
  760. Q6.5: I have an LP, except it's got several objective functions. 
  761. -----------------------------------------------------------------
  762.  
  763. A: Fundamental to the class of Multiple Criteria models is that
  764. there may no longer be the concept of a unique solution. I am
  765. unaware of any public domain code to approach such problems,
  766. though I have seen a reference to MATLAB's Optimization
  767. Toolbox. Approaches that have worked are: 
  768.  
  769.  o Goal Programming (treat the objectives as constraints with
  770.    costed slacks), or, almost equivalently, form a composite
  771.    function from the given objective functions; 
  772.  o Pareto preference analysis (essentially brute force
  773.    examination of all vertices); 
  774.  o Put your objective functions in priority order, optimize on
  775.    one objective, then change it to a constraint fixed at the
  776.    optimal value (perhaps subject to a small tolerance), and
  777.    repeat with the next function. 
  778.  
  779. There is a section on this whole topic in [Nemhauser]. {Hwang]
  780. has also been recommended by a reader on Usenet. As a final piece
  781. of advice, if you can cast your model in terms of physical realities,
  782. or dollars and cents, sometimes the multiple objectives disappear!
  783. 8v) 
  784.  
  785. Q6.6: I have an LP that has large almost-independent matrix
  786. blocks that are linked by a few constraints. Can I take advantage
  787. of this? 
  788. -----------------------------------------------------------
  789.  
  790. A: Possibly. See section 6.2 in [Nemhauser] for a discussion of
  791. Dantzig-Wolfe decomposition. I am told that the commercial code
  792. OSL has features to assist in doing this. With any other code, you'll
  793. have to create your own framework and then call the LP solver to
  794. solve the subproblems. The folklore is that generally such schemes
  795. take a long time to converge so that they're slower than just solving
  796. the model as a whole, although research continues. For now my
  797. advice, unless you are using OSL or your model is so huge that a
  798. good solver can't fit it in memory, is to not bother decomposing it.
  799. It's probably more cost effective to upgrade your solver, if the
  800. algorithm is limiting you, than to invest your time; but I suppose
  801. that's an underlying theme in a lot of my advice. 8v) 
  802.  
  803. Q6.7: I am looking for an algorithm to compute the convex hull
  804. of a finite number of points in n-dimensional space. 
  805. --------------------------------------------------------------
  806.  
  807. A: There is a program called qhull, available at
  808. ftp://geom.umn.edu/pub/software/qhull.tar.Z. When you
  809. uncompress it and untar it, it will create a directory called qhull
  810. which has source code plus a README file. It uses the "Beneath
  811. Beyond" method, described in [Edelsbrunner]. A code in C called 
  812. cdd is available at ftp://ftp.efpl.ch/incoming/dma and is written by
  813. Komei Fukuda; download the file named cdd-***.tar.Z, where ***
  814. is the version number (choose the most recent version, which at
  815. last check was 053). It solves the problem stated above, as well as
  816. that of enumerating all vertices. A code in C called rs by David
  817. Avis implements the reverse search method. There is a directory in 
  818. ftp://elib.zib-berlin.de/pub/mathprog/polyth that contains pointers
  819. to some tools for such problems. Other algorithms for such
  820. problems are described in [Swart], [Seidel], and [Avis]. Such topics
  821. are said to be discussed in [Schrijver] (page 224), [Chvatal]
  822. (chapter 18), [Balinski], and [Mattheis] as well. Part of the method
  823. described in [Avis], to enumerate vertices, is implemented in a
  824. Mathematica package called VertexEnum.m at
  825. ftp://cs.sunysb.edu/pub/Combinatorica, in file VE041.Z. 
  826.  
  827. Q6.8: Are there any parallel LP codes? 
  828. ---------------------------------------
  829.  
  830. A: The vendors for OSL, CPLEX and XPRESS-MP each have
  831. announced parallel implementations of Branch and Bound solvers
  832. for MIP. Jeffrey Horn (horn@cs.wisc.edu) has compiled a
  833. bibliography of papers relating to research on parallel B&B. There
  834. is an annotated bibliography of parallel methods in Operations
  835. Research in general, in Vol 1 (1), 1989 of the ORSA Journal on
  836. Computing, although by now it might be more than a *little* out of
  837. date. 
  838.  
  839. I'm not aware of any implementations (beyond the "toy" level) of
  840. general sparse Simplex or interior-point solvers on parallel
  841. machines. If your particular model is a good candidate for
  842. decomposition (see topic, above) then parallelism could be very
  843. useful, but you'll have to implement it yourself. Here's what I say
  844. to people who write parallel LP solvers as class projects: 
  845.  
  846. You are probably working with the tableau form of the Simplex
  847. method. This method works well for small models, but it is
  848. inefficient for most real-world models because such models are
  849. usually <1% dense. Sparse matrix methods dominate here. It may
  850. well be true that you can get good parallel speedups with your code,
  851. but I'd wager that by the time you get to problems with 1000 rows,
  852. any parallel-dense LP code will be slower than a single- processor
  853. sparse code. And, worse yet, I think it's generally accepted that no
  854. one currently knows how to do a good (i.e., scalable) parallel sparse
  855. LP code. I wouldn't be harping on this point, except that most
  856. people's interest in parallelism is because of the promise of
  857. scalability, in which case large-scale considerations are important.
  858. Writing even a single-processor large-scale LP code is a
  859. multi-year project, realistically. The point is, don't get too
  860. enthralled by speedups in your code, unless there's something to
  861. what you are doing that I haven't guessed. 
  862.  
  863. Q6.9: What software is there for Network models? 
  864. -------------------------------------------------
  865.  
  866. A: Special cases of this problem are the Transportation Problem,
  867. the Assignment Problem, and the Shortest Path Problem. Some
  868. commercial LP solvers include a network solver. See [Kennington],
  869. which contains some source code for Netflo, a code available at
  870. ftp://dimacs.rutgers.edu/pub/netflow/mincost/solver-1, but I don't
  871. know the copyright situation (I always thought you had to buy the
  872. book to get the code). Other network solvers are on this same 
  873. DIMACS server in ftp://dimacs.rutgers.edu/pub/netflow. Another
  874. text containing Fortran code is [Bertsekas], though I am unaware
  875. of any place that has the source code online. Simiarly, [Burkard]
  876. contains Fortran code for the Assignment Problem. There is an
  877. ACM TOMS routine, #548, located at
  878. ftp://netlib2.cs.utk.edu/toms/548, that solves the Assignment
  879. problem using the Hungarian Method. An article in the ORSA
  880. Journal on Computing in 1991 by Kennington and Wang
  881. investigated the performance of some algorithms. 
  882.  
  883. The following software for Network models is available by sending
  884. mail to "ftp-request@theory.stanford.edu". To obtain the desired
  885. software, put the following as the SUBJECT: 
  886.  
  887.     "send csmin.tar"    to get the cost scaling min-cost flow/
  888.                         transportation problem code (CS).  (current
  889.                         version 1.2)
  890.     "send splib.tar"    to get the library of shortest paths codes and
  891.                         problem generators.
  892.     "send csas.tar"     to get the assignment problem codes (CSA).
  893.     (A maximum flow code will be available in the Fall of 1994.)
  894.  
  895. Technical reports describing the above implementation are also
  896. available. The SUBJECT line should contain the following. 
  897.  
  898.     "send stan-cs-92-1439.ps"    to get the CS implementation report.
  899.     "send stan-cs-93-1480.ps"    to get the SPLIB report.
  900.     "send stan-cs-93-1481.ps"    to get the CSA implementation report.
  901.  
  902. Q6.10: What software is there for the Traveling Salesman
  903. --------------------------------------------------------
  904. Problem (TSP)? 
  905. ---------------
  906.  
  907. A: TSP is a famously hard problem that has attracted many of the
  908. best minds in the field. Solving for a proved optimum is
  909. combinatorial in nature; methods have been explored both to give
  910. proved optimal solutions, and to give approximate but "good"
  911. solutions. To my knowledge, there aren't any commercial products
  912. to solve this problem, nor are there any public domain codes
  913. available by anonymous FTP. For a bibliography, check the Integer
  914. Programming section of [Nemhauser], particularly the references
  915. with the names Groetschel and/or Padberg in them. A good
  916. reference is [Lawler]. There are some heuristics for getting a
  917. "good" solution in the article by Lin and Kernighan in Operations
  918. Research, Vol 21 (1973), pp 498-516. [Syslo] contains some
  919. algorithms and Pascal code. Numerical Recipes [Press] contains
  920. code that uses Simulated Annealing. [Bentley] is said to contain a
  921. description of how to write a TSP code. Code for a solver can be
  922. obtained via instructions in [Volgenant]. Bob Craig of AT&T
  923. (kat3@uscbu.ih.att.com) has software, for both exact solution and
  924. heuristics, that he is willing to make available to those who request
  925. it. Likewise, Chad Hurwitz (churritz@crash.cts.com), offers a code
  926. called tsp_solve for heuristic and optimal solution, to those who
  927. email him. 
  928.  
  929. Q6.11: What software is there for the Knapsack Problem? 
  930. --------------------------------------------------------
  931.  
  932. A: As with the TSP, I don't know of any commercial solvers for
  933. this specific problem. Any good MIP solver should be able to be
  934. used, although any given instance of this problem could be difficult.
  935. Specialized algorithms are said to be available in [Syslo] and 
  936. [Martello]. 
  937.  
  938. Q6.12: What software is there for Stochastic Programming? 
  939. ----------------------------------------------------------
  940.  
  941. A: [Thanks to Derek Holmes, dholmes@engin.umich.edu, for this
  942. text.] Your success solving a stochastic program depends greatly on
  943. the characteristics of your problem. The two broad classes of
  944. stochastic programming problems are recourse problems and
  945. chance- constrained (or probabilistically constrained) problems. 
  946.  
  947. Recourse Problems are staged problems wherein one alteranates
  948. decisions with realizations of stochastic data. The objective is to
  949. minimize total expected costs of all decisions. The main sources of
  950. code (not necessarily public domain) depend on how the data is
  951. distributed and how many stages (decision points) are in the
  952. problem. For discretely distributed multistage problems, a good
  953. package called MSLiP is available from Gus Gassman
  954. (gassmann@ac.dal.ca, written up in Math. Prog. 47,407-423) Also,
  955. for not huge discretely distributed problems, a deterministic
  956. equivalent can be formed which can be solved with a standard
  957. solver. STOPGEN, available via anonymous FTP from this author
  958. is a program which forms deterministic equiv. MPS files from
  959. stopro problems in standard format (Birge, et. al., COAL
  960. newsletter 17). The most recent program for continuously
  961. distributed data is BRAIN, by K. Frauendorfer
  962. (frauendorfer@sgcl1.unisg.ch, written up in detail in the author's
  963. monograph ``Stochastic Two-Stage Programming'', Lecture Notes
  964. in Economics & Math. Systems #392 (Springer-Verlag). 
  965.  
  966. CCP problems are not usually staged, and have a constraint of the
  967. form Pr( Ax <= b ) >= alpha. The solvability of CCP problems
  968. depends on the distribution of the data (A &/v b). I don't know of
  969. any public domain codes for CCP probs., but you can get an idea of
  970. how to approach the problem by reading Chapter 5 by Prof. A.
  971. Prekopa (prekopa@cancer.rutgers.edu) Y. Ermoliev, and R. J-B.
  972. Wets, eds., Numerical Techniques for Stochastic Optimization
  973. (Series in Comp. Math. 10, Springer-Verlag, 1988). 
  974.  
  975. Both Springer Verlag texts mentioned above are good introductory
  976. references to Stochastic Programming. This list of codes is far from
  977. comprehensive, but should serve as a good starting point. 
  978.  
  979. Q6.13: I need to do post-optimal analysis. 
  980. -------------------------------------------
  981.  
  982. A: Many commercial LP codes have features to do this. Also called
  983. Ranging or Sensitivity Analysis, it gives information about how the
  984. coefficients in the problem could change without affecting the
  985. nature of the solution. Most LP textbooks, such as [Nemhauser],
  986. describe this. Unfortunately, all this theory applies only to LP. 
  987.  
  988. For a MIP model with both integer and continuous variables, you
  989. could get a limited amount of information by fixing the integer
  990. variables at their optimal values, re-solving the model as an LP,
  991. and doing standard post-optimal analyses on the remaining
  992. continuous variables; but this tells you nothing about the integer
  993. variables, which presumably are the ones of interest. Another MIP
  994. approach would be to choose the coefficients of your model that are
  995. of the most interest, and generate "scenarios" using values within a
  996. stated range created by a random number generator. Perhaps five
  997. or ten scenarios would be sufficient; you would solve each of them,
  998. and by some means compare, contrast, or average the answers that
  999. are obtained. Noting patterns in the solutions, for instance, may
  1000. give you an idea of what solutions might be most stable. A third
  1001. approach would be to consider a goal-programming formulation;
  1002. perhaps your desire to see post-optimal analysis is an indication
  1003. that some important aspect is missing from your model. 
  1004.  
  1005. Q6.14: Do LP codes require a starting vertex? 
  1006. ----------------------------------------------
  1007.  
  1008. A: No. You just have to give an LP code the constraints and the
  1009. objective function, and it will construct the vertices for you. Most
  1010. codes go through a so-called two phase method, wherein the code
  1011. first looks for a feasible solution, and then works on getting an
  1012. optimal solution. The first phase can begin anywhere, such as with
  1013. all the variables at zero (though commercial codes typically have a
  1014. so-called "crash" algorithm to pick a better starting point). So, no,
  1015. you don't have to give a code a starting point. On the other hand, it
  1016. is not uncommon to do so, because it can speed up the solution time
  1017. tremendously. Commercial codes usually allow you to do this (they
  1018. call it a "basis", though that's a loose usage of a specific linear
  1019. algebra concept); free codes generally don't. You'd normally want
  1020. to bother with a starting basis only when solving families of related
  1021. and difficult LP's (i.e., in some sort of production mode). 
  1022.  
  1023.  
  1024. Q7. "What references are there in this field?" 
  1025. +++++++++++++++++++++++++++++++++++++++++++++++
  1026.  
  1027. A: What follows here is an idiosyncratic list, a few books that I like
  1028. or have been recommended on the net. I have *not* reviewed them
  1029. all. 
  1030.  
  1031. Regarding the common question of the choice of textbook for a
  1032. college LP course, it's difficult to give a blanket answer because of
  1033. the variety of topics that can be emphasized: brief overview of
  1034. algorithms, deeper study of algorithms, theorems and proofs,
  1035. complexity theory, efficient linear algebra, modeling techniques,
  1036. solution analysis, and so on. An small and unscientific poll of
  1037. ORCS-L mailing list readers in 1993 uncovered a consensus that 
  1038. [Chvatal] was in most ways pretty good, at least for an
  1039. algorithmically oriented class. For a class in modeling, a book about
  1040. a commercial code would be useful (LINDO, AMPL, GAMS were
  1041. suggested), especially if the students are going to use such a code;
  1042. and I have always had a fondness for [Williams]. I have marked
  1043. with an arrow ("->") books that received positive mention in this
  1044. poll (I included my own votes too 8v) ). The lack of an arrow does
  1045. not imply anything negative about a textbook, only that no one
  1046. responded to the survey to say they'd used it for a class and liked it. 
  1047.  
  1048. General reference 
  1049. ------------------
  1050.  
  1051.  o Nemhauser, Rinnooy Kan, & Todd, eds, Optimization,
  1052.    North-Holland, 1989. (Very broad-reaching, with large
  1053.    bibliography. Good reference; it's the place I tend to look
  1054.    first. Expensive, and tough reading for beginners.) 
  1055.  
  1056. Books containing source code 
  1057. -----------------------------
  1058.  
  1059.  o Best and Ritter, Linear Programming: active set analysis
  1060.    and computer programs, Prentice-Hall, 1985. 
  1061.  o Bertsekas, D.P., Linear Network Optimization: Algorithms
  1062.    and Codes, MIT Press, 1991. 
  1063.  o Bunday and Garside, Linear Programming in Pascal,
  1064.    Edward Arnold Publishers, 1987. 
  1065.  o Bunday, Linear Programming in Basic (presumably the
  1066.    same publisher). 
  1067.  o Burkard and Derigs, Springer Verlag Lecture Notes in Math
  1068.    Systems #184 (the Assignment Problem and others). 
  1069.  o Kennington & Helgason, Algorithms for Network
  1070.    Programming, Wiley, 1980. (A special case of LP; contains
  1071.    Fortran source code.) 
  1072.  o Martello and Toth, Knapsack Problems: Algorithms and
  1073.    Computer Implementations, Wiley, 1990. (Contains Fortran
  1074.    code, comes with a disk - also covers Assignment Problem.) 
  1075.  o Press, Flannery, Teukolsky & Vetterling, Numerical Recipes,
  1076.    Cambridge, 1986. (Comment: use their LP code with care.) 
  1077.  o Syslo, Deo & Kowalik, Discrete Optimization Algorithms
  1078.    with Pascal Programs, Prentice-Hall (1983). (Contains code
  1079.    for 28 algorithms such as Revised Simplex, MIP, networks.) 
  1080.  
  1081. LP textbooks 
  1082. -------------
  1083.  
  1084.  o -> Bazaraa, Jarvis and Sherali. Linear Programming and
  1085.    Network Flows. (Grad level.) 
  1086.  o -> Chvatal, Linear Programming, Freeman, 1983.
  1087.    (Undergrad or grad.) 
  1088.  o -> Daellenbach and Bell, A User's Guide to LP. (Good for
  1089.    engineers, but may be out of print.) 
  1090.  o -> Ecker & Kupferschmid, Introduction to Operations
  1091.    Research. 
  1092.  o Ignizio, J.P. & Cavalier, T.M., Linear Programming,
  1093.    Prentice Hall, 1994. (Covers usual LP topics, plus interior
  1094.    point, multi-objective and heuristic techniques.) 
  1095.  o Luenberger, Introduction to Linear and Nonlinear
  1096.    Programming, Addison Wesley, 1984. (Updated version of
  1097.    an old standby.) 
  1098.  o -> Murtagh, B., Advanced Linear Programming,
  1099.    McGraw-Hill, 1981. (Good one after you've read an
  1100.    introductory text.) 
  1101.  o Murty, K., Linear and Combinatorial Programming. 
  1102.  o Nazareth, J.L., Computer Solution of Linear Programs,
  1103.    Oxford University Press, New York and Oxford, 1987. 
  1104.  o -> Schrijver, A., Theory of Linear and Integer
  1105.    Programming, Wiley, 1986. (Advanced) 
  1106.  o -> Taha, H., Operations Research: An Introduction, 1987. 
  1107.  o -> Thie, P.R., An Introduction to Linear Programming and
  1108.    Game Theory, Wiley, 1988. 
  1109.  o -> Williams, H.P., Model Building in Mathematical
  1110.    Programming, Wiley 1993, 3rd edition. (Little on
  1111.    algorithms, but excellent for learning what makes a good
  1112.    model.) 
  1113.  
  1114. Interior-Point LP (popularly but imprecisely called
  1115. ---------------------------------------------------
  1116. "Karmarkar") 
  1117. -------------
  1118.  
  1119.  o Arbel, Ami, Exploring Interior-Point Linear Programming,
  1120.    MIT Press, 1993. Includes small-scale IBM PC software
  1121.    (binary only). 
  1122.  o -> Fang and Puthenpura, Linear Optimization and
  1123.    Extensions. (Grad level textbook, also contains some
  1124.    Simplex and Ellipsoid. I heard mixed opinions on this one.) 
  1125.  o Lustig, Marsten & Shanno, "Interior Point Methods for
  1126.    Linear Programming: Computational State of the Art",
  1127.    ORSA Journal on Computing, Vol. 6, No. 1, Winter 1994,
  1128.    pp. 1-14. Followed by commentary articles, and a rejoinder
  1129.    by the authors. 
  1130.  
  1131. Documentation for commercial codes (may be suitable as a
  1132. --------------------------------------------------------
  1133. classroom text) 
  1134. ----------------
  1135.  
  1136.  o Bisschop & Entriken, AIMMS: The Modeling System,
  1137.    Paragon Decision Technology, 1993. 
  1138.  o -> Brooke, Kendrick & Meeraus, GAMS: A Users' Guide,
  1139.    The Scientific Press, 1988. 
  1140.  o -> Fourer, Gay & Kernighan, AMPL: A Modeling
  1141.    Language for Mathematical Programming, The Scientific
  1142.    Press / Boyd & Fraser, 1992. (Comes with DOS "student"
  1143.    version including MINOS and CPLEX.) 
  1144.  o -> Greenberg, H.J., Modeling by Object-Driven Linear
  1145.    Elemental Relations: A User's Guide for MODLER, Kluwer
  1146.    Academic Publishers, 1993. 
  1147.  o -> Schrage, L., LINDO: An Optimization Modeling
  1148.    System, The Scientific Press, 1991. 
  1149.  
  1150. Other publications 
  1151. -------------------
  1152.  
  1153.  o Ahuja, Magnanti & Orlin, Network Flows, Prentice Hall,
  1154.    1993. 
  1155.  o Avis & Fukuda, "A Pivoting Algorithm for Convex Hulls
  1156.    and Vertex Enumeration of Arrangements and Polyhedra",
  1157.    Discrete and Computational Geometry, 8 (1992), 295--313. 
  1158.  o Balas, E. and Martin, C., "Pivot And Complement: A
  1159.    Heuristic For 0-1 Programming Problems", Management
  1160.    Science, 1980, Vol 26, pp 86-96. 
  1161.  o Balinski, M.L., "An Algorithm for Finding all Vertices of
  1162.    Convex Polyhedral Sets", SIAM J. 9, 1, 1961. 
  1163.  o Bentley, J.L., "Writing Efficient Programs," Prentice Hall,
  1164.    1982. 
  1165.  o Bondy & Murty, Graph Theory with Applications. 
  1166.  o Edelsbrunner, Algorithms in Combinatorial Geometry,
  1167.    Springer Verlag, 1987. 
  1168.  o Forsythe, Malcolm & Moler, Computer Methods for
  1169.    Mathematical Computations, Prentice-Hall. 
  1170.  o -> Gill, Murray and Wright, Numerical Linear Algebra and
  1171.    Optimization, Addison-Wesley, 1991. 
  1172.  o Greenberg, H.J., A Computer-Assisted Analysis System for
  1173.    Mathematical Programming Models and Solutions: A
  1174.    User's Guide for ANALYZE, Kluwer Academic Publishers,
  1175.    1993. 
  1176.  o Hwang & Yoon, Multiple Attribute Decision Making :
  1177.    Methods and Applications, Springer-Verlag, Lecture Notes
  1178.    #186. 
  1179.  o Lawler, Lenstra, et al, The Traveling Salesman Problem,
  1180.    Wiley, 1985. 
  1181.  o Mattheis and Rubin, "A Survey and Comparison of
  1182.    Methods for Finding All Vertices of Convex Polyhedral
  1183.    Sets", Mathematics of Operations Research, vol. 5 no. 2
  1184.    1980, pp. 167-185. 
  1185.  o More' & Wright, Optimization Software Guide, SIAM
  1186.    Books, 1993. 
  1187.  o Murty, Network Programming, Prentice Hall, 1992. 
  1188.  o Papadimitriou & Steiglitz, Combinatorial Optimization. 
  1189.  o Reeves, C.R., ed., Modern Heuristic Techniques for
  1190.    Combinatorial Problems, Halsted Press (Wiley), 1993.
  1191.    (Contains chapters on tabu search, simulated annealing,
  1192.    genetic algorithms, neural nets, and Lagrangian relaxation.) 
  1193.  o Seidel, "Constructing Higher-Dimensional Convex Hulls at
  1194.    Logarithmic Cost per Face", 1986, 18th ACM STOC,
  1195.    404--413. 
  1196.  o Smale, Stephen, "On the Average Number of Steps in the
  1197.    Simplex Method of Linear Programming", Math
  1198.    Programming 27 (1983), 241-262. 
  1199.  o Swart, "Finding the Convex Hull Facet by Facet", Journal
  1200.    of Algorithms, 6 (1985), 17--48. 
  1201.  o Volgenant, A., Symmetric TSPs, European Journal of
  1202.    Operations Research, 49 (1990) 153-154. 
  1203.  
  1204. On-Line Papers and Bibliographies 
  1205. ----------------------------------
  1206.  
  1207.  o Computational Mathematics Archive (London and South
  1208.    East Centre for High Performance Computing)
  1209.    http://www.lpac.qmw.ac.uk/SEL-HPC/Articles/GeneratedHtml/math.opt.html
  1210.  o Bibliography of books and survey papers on combinatorial
  1211.    optimization compiled by Brian Borchers
  1212.    (borchers@nmt.edu),
  1213.    ftp://archives.math.utk.edu/teaching.materials/bibliography/comb.opt.
  1214.  o Bibliography of books and papers on Interior-Point methods
  1215.    (taking 4 megabytes storage with over 1300 entries!?!) in
  1216.    ftp://netlib2.cs.utk.edu/bib/intbib.bib, compiled by Dr.
  1217.    Eberhard Kranich (puett@math.uni-wuppertal.de). 
  1218.  
  1219.  
  1220. Q8. "How do I access the Netlib server?" 
  1221. +++++++++++++++++++++++++++++++++++++++++
  1222.  
  1223. A: If you have FTP access, you can try "ftp netlib2.cs.utk.edu",
  1224. using "anonymous" as the Name, and your email address as the
  1225. Password. Do a "cd (dir)" where (dir) is whatever directory was
  1226. mentioned, and look around, then do a "get (filename)" on
  1227. anything that seems interesting. There often will be a "README"
  1228. file, which you would want to look at first. Another FTP site is
  1229. netlib.att.com although you will first need to do "cd netlib" before
  1230. you can cd to the (dir) you are interested in. Alternatively, you can
  1231. reach an e-mail server via "netlib@ornl.gov", to which you can
  1232. send a message saying "send index from (dir)"; follow the
  1233. instructions you receive. This is a list of sites mirroring the netlib
  1234. repository: 
  1235.  
  1236.  o Norway netlib@nac.no 
  1237.  o England netlib@ukc.ac.uk 
  1238.  o Germany anonymous@elib.zib-berlin.de 
  1239.  o Taiwan netlib@nchc.edu.tw 
  1240.  o Australia netlib@draci.cs.uow.edu.au 
  1241.  
  1242. For those who have WWW (Mosaic, etc.) access, one can access
  1243. Netlib via the URL http://www.netlib.org. Also, there is, for X
  1244. window users, a utility called xnetlib that is available at
  1245. ftp://netlib2.cs.utk.edu/xnetlib (look at the "readme" file first). 
  1246.  
  1247.  
  1248. Q9. "Who maintains this FAQ list?" 
  1249. +++++++++++++++++++++++++++++++++++
  1250.  
  1251. A:  John W. Gregory     jwg@cray.com         612-683-3673
  1252.     Applications Dept.  Cray Research, Inc.  Eagan, MN 55121 USA
  1253.  
  1254. This article is Copyright 1994 by John W. Gregory. It may be freely
  1255. redistributed in its entirety provided that this copyright notice is not
  1256. removed. It may not be sold for profit or incorporated in
  1257. commercial documents without the written permission of the
  1258. copyright holder. Permission is expressly granted for this document
  1259. to be made available for file transfer from installations offering
  1260. unrestricted anonymous file transfer on the Internet. 
  1261.  
  1262. The material in this document does not reflect any official position
  1263. taken by Cray Research, Inc. While all information in this article is
  1264. believed to be correct at the time of writing, it is provided "as is"
  1265. with no warranty implied. 
  1266.  
  1267. If you wish to cite this FAQ formally (hey, someone actually asked
  1268. me this), you may use: 
  1269.  
  1270.   Gregory, John W. (jwg@cray.com) "Linear Programming FAQ",
  1271.   (1994) Usenet sci.answers.  Available via anonymous FTP
  1272.   from rtfm.mit.edu in
  1273.   /pub/usenet/sci.answers/linear-programming-faq
  1274.  
  1275. There's a mail server on that machine, so if you don't have FTP
  1276. privileges, you can send an e-mail message to
  1277. mail-server@rtfm.mit.edu containing: 
  1278.  
  1279.     send usenet/sci.answers/linear-programming-faq
  1280.  
  1281. as the body of the message to receive the latest version (it is posted
  1282. on the first working day of each month). This FAQ is cross-posted
  1283. to news.answers and sci.op-research. If you have access to a World
  1284. Wide Web server (Mosaic, Lynx, etc.), you can use 
  1285. ftp://rtfm.mit.edu/pub/usenet/sci.answers/linear-programming-faq. 
  1286. ftp://rtfm.mit.edu/pub/usenet/news.answers/linear-programming-faq.
  1287.  
  1288. ftp://rtfm.mit.edu/pub/usenet/sci.op-research/linear-programming-faq.
  1289.  
  1290. In compiling this information, I have drawn on my own knowledge
  1291. of the field, plus information from contributors to Usenet groups
  1292. and the ORCS-L mailing list. I give my thanks to all those who
  1293. have offered advice and support. I've tried to keep my own biases
  1294. (primarily, toward the high end of computing) from dominating
  1295. what I write here, and other viewpoints that I've missed are
  1296. welcome. Suggestions, corrections, topics you'd like to see covered,
  1297. and additional material, are all solicited. 
  1298.  
  1299.  
  1300. END linear-programming-faq 
  1301.  
  1302.